package com.yanyeori.framework.security.configprop;

import lombok.Getter;
import lombok.Setter;

/**
 * ip限流配置
 *
 * @author chenkuan 2021/1/26
 */
@Getter
@Setter
public class LimiterProps {
    //是否启用(默认false不启用)
    private boolean enable = false;
    //限流器缓存个数上限
    private int cacheMaxiSize = 1000;
    //默认ip单机每秒限流访问次数(默认0，不限制)
    private double permitsPerSecond = 0;
    //获取ip的访问令牌等待时间(毫秒，默认10毫秒)
    private long tryAcquireTimeOut = 10;
}
